{foreach from=$rows item=r}
{if $r.isLeaf }
	<li><a href="javascript:window.parent.openTab('{$r.name}','/books/admin/books.shtml?category_id={$r.categoryId}')" style="text-decoration:none;"><span>{$r.name}</span></a></li>
{else}
	<li data-options="state:'closed'">
		<span>{$r.name}</span>
		<ul>
		{widget template="statics/include/bk_category.tpl" moduleId="books" serviceId="CategoryService:findChildren" params="parent_id=`$r.categoryId`;status=9"}
		</ul>
	</li>
{/if}
{/foreach}
